using System;

namespace Deepcode.Flux.Core.Extensions
{
	/// <summary>
	/// Attribute that indicates that a field should have it's value
	/// loaded from an Xml Attribute.
	/// </summary>
	[AttributeUsage(AttributeTargets.Field, Inherited=true)]
	public class XmlCodonAttribute : Attribute
	{
		private string	_Name;
		private bool	_IsRequired;

		public XmlCodonAttribute( string name )
		{
			_Name  = name;
			_IsRequired = false;
		}
		
		public string Name 
		{
			get{ return _Name; }
			set{ _Name = value; }
		}
		public bool IsRequired
		{
			get{ return _IsRequired; }
			set{ _IsRequired=value; }
		}
	}
}
